﻿$(document).on("pageInit", "#edit-class", function (e, id, page) {
    $(page).find("[name=editClazzForm]").on("submit", function (evt) {
        evt.preventDefault();
        $(page).find("[name=editClazzForm]").ajaxSubmit({
            success: function (response) {
                if (response.indexOf("err:") > -1) {
                    $.toast(response.substr(4));
                    return false;
                }
                history.back();
            }
        });
    });
});